clear all
set more off

*** IMPORT doc count for the Fed
cd "C:\Dropbox\Average_target_survey\replication_folder\external_data"
import excel using "Factiva_JacksonHole_DailyCounts_2020601_2020116_USNewspapers_run20211024.xlsx", ///
	sheet("inflationtarget") cellrange("B4:C173") firstrow clear	
	
rename WithoutWebNews count_IT
cd "C:\Dropbox\Average_target_survey\replication_folder\workfiles"
compress
save temp_step012A, replace 
	
	
*** IMPORT doc count for the MONETARY POLICY
cd "C:\Dropbox\Average_target_survey\replication_folder\external_data"
import excel using "Factiva_JacksonHole_DailyCounts_2020601_2020116_USNewspapers_run20211024.xlsx", ///
	sheet("inflationtarget_wildcard") cellrange("B4:C173") firstrow clear	
rename WithoutWebNews count_ITwild
cd "C:\Dropbox\Average_target_survey\replication_folder\workfiles"
compress
save temp_step012B, replace 
	
	
*** IMPORT doc count for the MONETARY POLICY
cd "C:\Dropbox\Average_target_survey\replication_folder\external_data"
import excel using "Factiva_JacksonHole_DailyCounts_2020601_2020116_USNewspapers_run20211024.xlsx", ///
	sheet("averageinflationtarget") cellrange("B4:C173") firstrow clear	
rename WithoutWebNews count_AIT
cd "C:\Dropbox\Average_target_survey\replication_folder\workfiles"
compress
save temp_step012C, replace 

*** IMPORT doc count for the POWELL
cd "C:\Dropbox\Average_target_survey\replication_folder\external_data"
import excel using "Factiva_JacksonHole_DailyCounts_2020601_2020116_USNewspapers_run20211024.xlsx", ///
	sheet("averageinflationtarget_wildcard") cellrange("B4:C173") firstrow clear
rename WithoutWebNews count_AITwild
cd "C:\Dropbox\Average_target_survey\replication_folder\workfiles"
compress
save temp_step012D, replace 
	
use temp_step012A, clear
joinby Date using temp_step012B
joinby Date using temp_step012C
joinby Date using temp_step012D

compress
label var count_IT "Document count: Inflation Target"
label var count_ITwild "Document count: Inflation Target*"
label var count_AIT "Document count: Average Inflation Target"
label var count_AITwild "Document count: Average Inflation Target*"

save step012, replace
	